UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WHGHc4r8XrFohkv9Ghmmd9ldn2P0TGQ/PA2/8JVCuEo=' 
WHERE 
  key_id = 'fe4b2aae5272f7b8ed19b5873366f8cfdfc8f8d5901a1559a542d09f5a55291b' 
  AND (
    token = 'WHGHc4r8XrFohkv9Ghmmd9ldn2P0TGQ/PA2/8JVCuEo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040