UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9yrXv4yU9I47DzY7W8SnSpJo/S4l8NGjxi8U7c83kug=' 
WHERE 
  key_id = 'b6333435afd807a8e7ed3373f233734d0c6af0bb143e8f13bad9c7f0444ee9c4' 
  AND (
    token = '9yrXv4yU9I47DzY7W8SnSpJo/S4l8NGjxi8U7c83kug=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034