UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xzsynI5uCHAv/dTxt2HM0WioNVunUuQa+FT0vnHQU1Q='
WHERE
key_id = '83bdb0c565e5e4fe156b0e9c1553c57a8f49a80ad20fc060c24029fe6f263a9e'
AND (
token = 'xzsynI5uCHAv/dTxt2HM0WioNVunUuQa+FT0vnHQU1Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)