UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CRWG3NQDsPGIJr+x5aTTEFjDrSd8tjSFe4CJ+BdRnWs=' 
WHERE 
  key_id = 'b60a9572d5a0e3034f042cf41fbe99f6d2a03a2741babf5158e2813c1c27bdf9' 
  AND (
    token = 'CRWG3NQDsPGIJr+x5aTTEFjDrSd8tjSFe4CJ+BdRnWs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031