UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CUcGb/S4CZ09jwCY8l4Qj4FG063Eg5OZ/sY8dLfnRAI='
WHERE
key_id = '35076b1a4f639a8b7e0fd18c611176c258eeb5c8c96f99135ba92daca1f2552e'
AND (
token = 'CUcGb/S4CZ09jwCY8l4Qj4FG063Eg5OZ/sY8dLfnRAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)