UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1lJfUhIfRB9rOwzs28VqwSy8C7raTglOwLi2coVEF6M='
WHERE
key_id = '453b6fd67edf7e83657532c3ca6cecbb880700133479e3041dd1a5192cc2095c'
AND (
token = '1lJfUhIfRB9rOwzs28VqwSy8C7raTglOwLi2coVEF6M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)