UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zUcz7lsq0rDU7mqUA+XUbnMcEXcxxlxF7SLeux5ABSE='
WHERE
key_id = 'b19d5c4c1fecf66d16d21dfcdc9a09280441b1fe0e1806ffe4debfaaaadd8d5d'
AND (
token = 'zUcz7lsq0rDU7mqUA+XUbnMcEXcxxlxF7SLeux5ABSE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)