UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'O1pzVT+VWKZ4MnzqU93O9XQ71DlMUk4VVmBc8G2QJ0s='
WHERE
key_id = 'b2e79b30be084f9d4593f3eb405d0b6d2d70c9cbedb080a0688e491dfcaaa04b'
AND (
token = 'O1pzVT+VWKZ4MnzqU93O9XQ71DlMUk4VVmBc8G2QJ0s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)