UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wMvKL5nC0lMq4rPKKeOhzpPK7aajBTYd59tQnZ5mdxU=' 
WHERE 
  key_id = 'fc3194cae38b433e1bbc31bf4318a4de2fe45f4e3863252865cf0592400b3753' 
  AND (
    token = 'wMvKL5nC0lMq4rPKKeOhzpPK7aajBTYd59tQnZ5mdxU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020