UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+W1THEVHxEubWn+gpKWK+3AfGWVNj8WVy519OH/FT24='
WHERE
key_id = '5a010e8887d2d83e72ac87395565b587e42a0d087a400dba45adfa556d91b168'
AND (
token = '+W1THEVHxEubWn+gpKWK+3AfGWVNj8WVy519OH/FT24='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)