UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VomV3qAh4OOQNIgxU8LkeNK+l6z4LGyrf31amtPI5A='
WHERE
key_id = '555b9d22e23520ceda365984b0815a8ea39446fb8170bc047e78d0b4778ba9ec'
AND (
token = '+VomV3qAh4OOQNIgxU8LkeNK+l6z4LGyrf31amtPI5A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)