UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cmy2MYUWqcKIVCIEAlMjSDiTVOLt00i1ZoJlF+DRuKI='
WHERE
key_id = '61611273be2aabae7fea599071deaee90650a67791187bc2215b631f81180225'
AND (
token = 'Cmy2MYUWqcKIVCIEAlMjSDiTVOLt00i1ZoJlF+DRuKI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)