UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LEzZZ7wQnvBMG/phsaYysUywl/d2miy308/rGFRbGew=' 
WHERE 
  key_id = '9fb3eb4d8d55a3b59632d01d88f50afccdfe22ddb43ca07ec03dafdfe768e08b' 
  AND (
    token = 'LEzZZ7wQnvBMG/phsaYysUywl/d2miy308/rGFRbGew=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045