UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ruex/RMhYXukbIw4r1eBKdMnOKuwoVSUXaRxNN3X0EY='
WHERE
key_id = '388a5a042d3bbef6f30c6d0db25423844f11198f7caca13c6c46f45326622d56'
AND (
token = 'ruex/RMhYXukbIw4r1eBKdMnOKuwoVSUXaRxNN3X0EY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)