UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Zzo/5Gsa+ig1m4mcvkKDFsCErrgw/MK/QiYf7vGEz4='
WHERE
key_id = '342580f564b291e4dca4652b209bd10593ca6fef59e13b0df4c358885a59c69f'
AND (
token = '2Zzo/5Gsa+ig1m4mcvkKDFsCErrgw/MK/QiYf7vGEz4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)