UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vzKXorufkwPCTylUif3JO6B/XjMGLvdQLJriNf5bb9Y='
WHERE
key_id = '9cdabc024bd5b9999f5d4809390268b8c6f04eaaa3c97d4a4e490cc07620ef62'
AND (
token = 'vzKXorufkwPCTylUif3JO6B/XjMGLvdQLJriNf5bb9Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)