UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2By1C3dapG9jYwp3JMtkn3NgOR3cW1fmG/RD9OF7d48=' 
WHERE 
  key_id = '09bfd9c5572c38cdfa1340374e9ef01ba222865cdd27df74b2deb5a07b43f5df' 
  AND (
    token = '2By1C3dapG9jYwp3JMtkn3NgOR3cW1fmG/RD9OF7d48=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032