UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5mnuStAvo3KXKmA1x/ZYPTnSlu2UZVEsktST8qpbrGY='
WHERE
key_id = '3acadc4489f0877b05cf3d9a7ba9c412214b0dfc9793246955a655bfb84ffe66'
AND (
token = '5mnuStAvo3KXKmA1x/ZYPTnSlu2UZVEsktST8qpbrGY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)