UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uXNxJVeCGIOsL/icyQywOSklLvP7Zm+AiLoEu+51wQI=' 
WHERE 
  key_id = '62b99c925c95115e456ea0df6a90b69162a3d03a00bbd3f0cd2a6ccd8fc90be5' 
  AND (
    token = 'uXNxJVeCGIOsL/icyQywOSklLvP7Zm+AiLoEu+51wQI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036