UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'k6xtlVnNzP9NyWK7fU0/xkv5JIW7HchgNRgLHaM215o=' 
WHERE 
  key_id = '93ddd5b20d151b2181eb7ae80aa76cb7d040c539c3fec0564311947cc34edc9d' 
  AND (
    token = 'k6xtlVnNzP9NyWK7fU0/xkv5JIW7HchgNRgLHaM215o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028