UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DWnb/pNsJ9AJAU52sUC5RlylhyamhFHXYwMvv1CoAFM='
WHERE
key_id = '03c480cb411eca971e2f5e800cef01a1a8cd3dcb96039a4fd7d22db8d7fcf677'
AND (
token = 'DWnb/pNsJ9AJAU52sUC5RlylhyamhFHXYwMvv1CoAFM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)