UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '70N7+Qy+oLvFe/fQLpjCoZi0Sz29fbJNHWMu3XwWFLI='
WHERE
key_id = '9e36b2cf9ab1be330c5cac0fcfc1aa48e2a2f5b1938d50e18594de382e5693f4'
AND (
token = '70N7+Qy+oLvFe/fQLpjCoZi0Sz29fbJNHWMu3XwWFLI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)