UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z4KMYZTslol/F1O/WadnwXK0K7N66Fr5SlhOoxlXNU4='
WHERE
key_id = '175ffd24c4bfc30de3f9e1e02bc24dc0c84cb28506a2f14f5c451e1528fba001'
AND (
token = 'Z4KMYZTslol/F1O/WadnwXK0K7N66Fr5SlhOoxlXNU4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)