UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xvr8yI2wkUHJG2SLdfa3SDgHYMV2Wzv6jMzjOVkKWPw='
WHERE
key_id = '0e04457ad16b4db5576ddc334bdd301431bb355f764895ca9f8ec5d12e2f315f'
AND (
token = 'xvr8yI2wkUHJG2SLdfa3SDgHYMV2Wzv6jMzjOVkKWPw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)