UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zEndF5VdEL6Ce/sQXp10OeR/wUWx3N9S1eBq65HjAss=' 
WHERE 
  key_id = 'e590773a33a10aca88b671be72bfaa22804e9a46b652fb753a150063cc50c0f6' 
  AND (
    token = 'zEndF5VdEL6Ce/sQXp10OeR/wUWx3N9S1eBq65HjAss=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030