UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aLh04r3g4NQ2J2n57G/MQJ9HWxRBJ3vGIaGsR8otnrU=' 
WHERE 
  key_id = '104d169df2bb9c4079507a7946c2aa93a3ab71924f69f5451bc31b027d1bbe8b' 
  AND (
    token = 'aLh04r3g4NQ2J2n57G/MQJ9HWxRBJ3vGIaGsR8otnrU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021