UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'elt3EyCkmuL7E6fzSx2RmXt9thxh2LR+486iXXmK3OY='
WHERE
key_id = '79cb30b67a84ecd7023df3442ff1d4063c17fb79c3e94193676ce5246cfd546e'
AND (
token = 'elt3EyCkmuL7E6fzSx2RmXt9thxh2LR+486iXXmK3OY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)