UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7seCX4fnKwhc2A0drNxW9ITilz/FYIRYAlaEc98S9Dc=' 
WHERE 
  key_id = '4ab081e258d2736f6bb83cca3f6f7d044a14f1ec5091d634c53266a905e6f30f' 
  AND (
    token = '7seCX4fnKwhc2A0drNxW9ITilz/FYIRYAlaEc98S9Dc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031