UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Pdk6QfJbZWC/GXq33D1wUbDjMUz5asGni4FU6tT16+E=' 
WHERE 
  key_id = 'e1f996268cbbda6f2ab1038a47a37c72d24d7ef6d9cb56941b6708df38a3f70a' 
  AND (
    token = 'Pdk6QfJbZWC/GXq33D1wUbDjMUz5asGni4FU6tT16+E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029