UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/6bk8IgDSAJC/Z6WESKehE5gyefJn22ShJ32AbWzM4o=' 
WHERE 
  key_id = '96c999a65a65b459ea155b9dd62f71972365ceeec37b44f0a6ce0b9299b3abe1' 
  AND (
    token = '/6bk8IgDSAJC/Z6WESKehE5gyefJn22ShJ32AbWzM4o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029