UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ikNGfQrBFam2IzLJEAMq/QEZN3VOGblNfS8S7pG/aMg='
WHERE
key_id = '92669ff66d77307b05e364ad6bed125dd2644f757a4a1775c55c93cd0fdae2f0'
AND (
token = 'ikNGfQrBFam2IzLJEAMq/QEZN3VOGblNfS8S7pG/aMg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)