UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DfMYRFATCB/Ew0AZKgbz+qTwy0v4kyCA5wl1+fPazE8='
WHERE
key_id = '7f3328a9fd7383c18294b9d2e7991dc89cbd81de3ab28ef8f7edc86a8a29c7e6'
AND (
token = 'DfMYRFATCB/Ew0AZKgbz+qTwy0v4kyCA5wl1+fPazE8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)