UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MOPsCbYIMw9N6PLmFDxtw8fJfntNwqw1t8v0VY0YcwE=' 
WHERE 
  key_id = 'abfb5fdffd648b981ad81ad39e446155fd0ce80ef37647add81938c0cfdae43f' 
  AND (
    token = 'MOPsCbYIMw9N6PLmFDxtw8fJfntNwqw1t8v0VY0YcwE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048