UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mr8QvGGmFkmI+2f7u4/X/l//huK8HR5gWG4Ir2H/GV0=' 
WHERE 
  key_id = 'dc286dbdfb8a10b7dac73e70cc3e9a6321ec2b421e33435b66f6c61ae3c3c2ba' 
  AND (
    token = 'mr8QvGGmFkmI+2f7u4/X/l//huK8HR5gWG4Ir2H/GV0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048