UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yu4DU8URdMd0W6BqAO+uTZE/qcdCHQxqTvuw2rJeiO4='
WHERE
key_id = '79a3c7f71fd6f0997d8bf357edc57160072849919d4fc57d193edb92e3c3cf7c'
AND (
token = 'yu4DU8URdMd0W6BqAO+uTZE/qcdCHQxqTvuw2rJeiO4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)