UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '03JQOETsvJ5GvHr+KW8aY957Oa6tQNFY4NxMPkUAwqI=' 
WHERE 
  key_id = 'b8b7c565cea1eca2218fa5bdee7fce479fa8eb668eea124bd7ad861c692326be' 
  AND (
    token = '03JQOETsvJ5GvHr+KW8aY957Oa6tQNFY4NxMPkUAwqI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018