UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eMDDEXOfOM/Kvh7fJn6Yf03PRX8vYCx3gczRwlLJspA=' 
WHERE 
  key_id = '42b9ea79ce0b1a7631e6a3dc25addc9bad3debc1fb07301eba0813196ce7cf26' 
  AND (
    token = 'eMDDEXOfOM/Kvh7fJn6Yf03PRX8vYCx3gczRwlLJspA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00064