UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/M2FGxvMnNrMBW/uoJYF7LkFz8Nouc58BTrDA/KtRgc='
WHERE
key_id = '12fef5f25b1822dd549dd171bc78b3965d7ee633dc58dd7d4bf713543c4d55b4'
AND (
token = '/M2FGxvMnNrMBW/uoJYF7LkFz8Nouc58BTrDA/KtRgc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)