UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LxP4/Uk8PFKw5uz8fxxNbcRhozeF1ykI5hLLFFJSq64='
WHERE
key_id = '5f11c8962e529d5d3093ef0209d3126185c48ede3615fc433e710b983cb63284'
AND (
token = 'LxP4/Uk8PFKw5uz8fxxNbcRhozeF1ykI5hLLFFJSq64='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)