UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SMz/eC20ycTW8ljhXD64zm8rORgGmSNTdOGtKB8cLYA='
WHERE
key_id = '6d322ff238ccf71206fcaa70f5c263b196b92d01552199f94904da793f6c5f1d'
AND (
token = 'SMz/eC20ycTW8ljhXD64zm8rORgGmSNTdOGtKB8cLYA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)