UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2x/BYc8s1Re789PGb2139YBcCtIP1v0KCy4xyAsdppA=' 
WHERE 
  key_id = '7adac46e26e31f8f30fb9b082f20568e0c66cd51641e275d2fe0b7c0b30e6fed' 
  AND (
    token = '2x/BYc8s1Re789PGb2139YBcCtIP1v0KCy4xyAsdppA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016