UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'j2zlMFvLy26CGER2yni9gNevamzR5/n2a3xxHx02UQw=' 
WHERE 
  key_id = '815d2bdde1cbbbee0cfcf1b6b71edb6fc069fce716d6f644cc17b0d5a02c8fca' 
  AND (
    token = 'j2zlMFvLy26CGER2yni9gNevamzR5/n2a3xxHx02UQw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015