UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'y2lmup5FFQ1EbIawABtSU7+WAXggICT/RAtQf/Bt8JE=' 
WHERE 
  key_id = '302f6fa14e89535a4d9a625dbf9f2d473506b239ac3de7f4627d2b70a9b49de2' 
  AND (
    token = 'y2lmup5FFQ1EbIawABtSU7+WAXggICT/RAtQf/Bt8JE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027