UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zT3QP0ikHzYXOR0wjKcNnzhSzAml5HzY/3eE+wxlwmc=' 
WHERE 
  key_id = '03ce6bb24efb4efa28766ccca7022b366bc035c956b08859cf9fe7ccf3631a14' 
  AND (
    token = 'zT3QP0ikHzYXOR0wjKcNnzhSzAml5HzY/3eE+wxlwmc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026