UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tceOfAG/1j+sHtxaYRr5SK/G+CqwURdal9+QJEN1XBQ=' 
WHERE 
  key_id = '60ea8482c75d3a1405de775e44b1e7c17afcd1fd6cc0b6b64a4306e53eed3fea' 
  AND (
    token = 'tceOfAG/1j+sHtxaYRr5SK/G+CqwURdal9+QJEN1XBQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021