UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DKLZ2zahKzJjdUfe8fHTMV/gNot6PL4jL8HWK7WSJL8=' 
WHERE 
  key_id = '126e087c3cc0b2d68e22fa9cf3fea0157028ec566a1be5028e4c7483af6d5f58' 
  AND (
    token = 'DKLZ2zahKzJjdUfe8fHTMV/gNot6PL4jL8HWK7WSJL8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017