UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IeDBa/Zy1DpuXi1KrlpCxBRWiXTgO+T0MR0YbhtwoNs='
WHERE
key_id = '2a19a3d8c3c8bd916c21efdcc3707b5b5576663a414129096aeb0395ac3e7f77'
AND (
token = 'IeDBa/Zy1DpuXi1KrlpCxBRWiXTgO+T0MR0YbhtwoNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)