UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ux41ERDXj8vnQUY+888SyJDvwc4HdEoT9+Y2ADF0F3I='
WHERE
key_id = '7de0088f598eddee0c92b218c42ae3362fe74951dedff3f8a84bccc6771b9b02'
AND (
token = 'Ux41ERDXj8vnQUY+888SyJDvwc4HdEoT9+Y2ADF0F3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)