UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2aeiSwQblw/UboPSldq4pQt6RKj/yJKaR6kif3WtS70='
WHERE
key_id = '0d83ecbd758238ad9f27b5a61a6a60fbd6ef564637e16b3948f04c6ac235ad1e'
AND (
token = '2aeiSwQblw/UboPSldq4pQt6RKj/yJKaR6kif3WtS70='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)