UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EL+WzIQTF3/WlTKFhb3T6kciV39Z+2CjH0Hd9KDsvsA='
WHERE
key_id = '4b741c0becfeb0f4950ff768da1b37eb117576ebf85d1b2c37c236053f1ca845'
AND (
token = 'EL+WzIQTF3/WlTKFhb3T6kciV39Z+2CjH0Hd9KDsvsA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)