UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6Er8nLe5bU/USPEyn5OdYv0WpwrSOs11hqS1G09bgIo=' 
WHERE 
  key_id = '2e929f59a4ed80024506f9ab3f0fdb8818a019c45ba0c937854f7c8a2a3c8df7' 
  AND (
    token = '6Er8nLe5bU/USPEyn5OdYv0WpwrSOs11hqS1G09bgIo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030